package com.example.demo.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo.entity.Shop;
import com.example.demo.entity.Shopcard2;
import com.example.demo.mapper.Shop2Mapper;
import com.example.demo.service.Shop2Service;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class Shop2Impl extends ServiceImpl<Shop2Mapper, Shopcard2> implements Shop2Service {

    @Resource
    public Shop2Mapper shop2Mapper;

    public Integer getid(String username,Integer shopid)
    {
if(shop2Mapper.pandun2(username, shopid)!=null)return shop2Mapper.findid(username, shopid);
else {
    shop2Mapper.addshopcard2(username, shopid);
    return shop2Mapper.findid(username, shopid);
}
    }

    }


